package vn.bus.bk.place;

import com.actionbarsherlock.app.SherlockListActivity;
import com.actionbarsherlock.view.MenuItem;

import vn.bus.bk.adapter.ListBusAdapter;
import vn.bus.bk.adapter.ListTwoPlaceAdapter;
import android.os.Bundle;

public class ListBusForSearchToPlace extends SherlockListActivity{

    public static ListBusAdapter busAdapter;
    public static ListTwoPlaceAdapter busTwoPlaceAdapter;
    public static boolean isOneRoute = false;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
	// TODO Auto-generated method stub
	super.onCreate(savedInstanceState);
	getSupportActionBar().setDisplayHomeAsUpEnabled(true);
	getSupportActionBar().setHomeButtonEnabled(true);
	
	if(isOneRoute){
	    setListAdapter(busAdapter);
	}else{
	    setListAdapter(busTwoPlaceAdapter);
	}
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
	if (item.getItemId() == android.R.id.home) {
	    finish();
	}
	return super.onOptionsItemSelected(item);
    }
    
}
